% icrerea.m
% 2/17/96

% run this file in matlab.  creates ab.dat and ada_re94.dat.
% (a:)pkarc m ada_re94.arc ada_re94.dat
% copy ab.dat a:
% copy ada_re94.arc a:


tind= find(chamber==2);
tind1 = zeros(Ns,1);
tind1(tind) = ones(tind);
t = t- tind1.*(HEndYear-BeginYear+1);

tind= find(t==48);
t(tind)=ones(tind)*47;

tind= find(t==49);
t(tind)=ones(tind)*48;

tind= find(t==50);
t(tind)=ones(tind)*49;

tind= find(t==51);
t(tind)=ones(tind)*50;

tind= find(t==52);
t(tind)=ones(tind)*51;

tind= find(t==53);
t(tind)=ones(tind)*52;

tind= find(t==54);
t(tind)=ones(tind)*53;

tind= find(t==55);
t(tind)=ones(tind)*54;

tind= find(t==56);
t(tind)=ones(tind)*55;

tind= find(t==57);
t(tind)=ones(tind)*56;

tind= find(t==58);
t(tind)=ones(tind)*57;

tind= find(t==59);
t(tind)=ones(tind)*58;

tind= find(t==60);
t(tind)=ones(tind)*59;

tind= find(t==61);
t(tind)=ones(tind)*60;

tind= find(t==62);
t(tind)=ones(tind)*61;

ayear = [(47:61),(63:96)]';

ahou = a(1:49);
bhou = b(1:49);
asen = a(50:98);
bsen = b(50:98);

ab = [ayear, ahou, bhou, asen, bsen];
save ab.dat ab /ascii;
%!copy ab.dat a:

yreal = (y-aNs)./bNs;
xx = [chamber, t, icpsr, pty, y, yreal];
save ada_re96.dat xx /ascii;

